#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QtGui>
#include "cocos2d.h"
#include "TreeWidget_CCScene.h"

#include "PEditors_CCProperties.h"
#include "cocowindow.h"

using namespace cocos2d;

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(CCEGLView *eglView, QWidget *parent = 0);
    ~MainWindow();
    //controls .
    TreeWidget_CCScene   * m_treeWidget_nodes;
    QListWidget * m_listWidget_res;
    CocoWindow * m_cocos2dwindow;
    
    PEditors_CCProperties * m_peditor_container;
    
    CCEGLView * m_eglView;
    
    void closeWindow();
    void clearWorkSpace();

public slots:
    void action_openParticleEditor();
    void action_export();
    void action_openproj();
    void action_new();
    void action_save();
    void action_saveas();
    void action_close();
    
protected:
    //virtual void contextMenuEvent(QContextMenuEvent *event);
    virtual void changeEvent(QEvent * event);
	int askSave();
	int save();
	int saveas();
private:
    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H
